Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Oct 24, 2025

No description provided.

@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Oct 24, 2025
@trask trask force-pushed the unify-jdbc-tests-2 branch 3 times, most recently from f58e9d4 to a253c52 Compare October 25, 2025 16:26
@trask trask force-pushed the unify-jdbc-tests-2 branch from 9436596 to fefd71f Compare October 25, 2025 18:19
@trask trask force-pushed the unify-jdbc-tests-2 branch 4 times, most recently from 10efdf0 to c0f03e4 Compare October 25, 2025 21:06
@trask trask force-pushed the unify-jdbc-tests-2 branch from c0f03e4 to 9d2feb2 Compare October 25, 2025 21:07
@trask trask force-pushed the unify-jdbc-tests-2 branch from 2d63bcd to 6e4b8c0 Compare October 26, 2025 00:35
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only change compared to the old javaagent PreparedStatementParametersTest is calling wrap()

if (init != null) {
init.accept(ds);
}
Class<?> originalDatasourceClass = ds.getClass();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capturing the original class here before to use in verification later

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only changes compared to the old javaagent JdbcInstrumentationTest are calling wrap() and a couple of other minor changes noted by review comments

return Stream.of(
Arguments.of(
new JdbcDataSource(),
(Consumer<DataSource>) ds -> ((JdbcDataSource) ds).setURL(jdbcUrls.get("h2")),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changed from setUrl in the javaagent test to setURL in this module because in the javaagent module, h2 version is overridden for slick test

try {
ds.setDriverClass(jdbcDriverClassNames.get(dbType));
} catch (PropertyVetoException e) {
throw new IllegalStateException(e);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changed from RuntimeException to IllegalStateException b/c it's now in src/main and so errorprone rules apply


@SuppressWarnings("deprecation") // using deprecated semconv
class DruicDataSourceTest {
class DruidDataSourceTest {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(unrelated fix)

Comment on lines -31 to +33
private String url;
Consumer<String> sqlConsumer = unused -> {};

public TestConnection() {}
private final String url;
private final Consumer<String> sqlConsumer;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated simplification

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed tests from here that are now covered by the shared tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only change compared to the old javaagent PreparedStatementParametersTest is calling wrap()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant